Skip to content

Conversation

@zhenrongliew
Copy link

Refactor QASM2's code generation to use the new Emit APIs.

@kaihsin
Copy link
Contributor

kaihsin commented Oct 21, 2025

@zhenrongliew is this PR ready to review? the CI is failing tho

@zhenrongliew
Copy link
Author

@zhenrongliew is this PR ready to review? the CI is failing tho

Seems like not yet. I will take a look at the failing tests

@zhenrongliew
Copy link
Author

@Roger-luo @kaihsin It seems the CI is failiing because it cannot import "kirin.dialects.ssacfg". Is this because the CI is tied to Kirin 0.17?

@david-pl david-pl linked an issue Oct 27, 2025 that may be closed by this pull request
@david-pl david-pl changed the base branch from main to david/571-kirin-upgrade-branch October 27, 2025 14:58
@zhenrongliew zhenrongliew marked this pull request as draft October 29, 2025 16:04
@zhenrongliew zhenrongliew marked this pull request as ready for review October 29, 2025 20:32
@zhenrongliew
Copy link
Author

@Roger-luo @kaihsin, this is PR should be ready for review. The codegen for qasm2, stim, and cirq_utils now works for 0.20 Kirin.

The CI complaints is due to some changes in EmitABC (QuEraComputing/kirin#555) that's not yet in main Kirin.

Further errors are due to MeasureID and AddressAnalysis still being refactored.

Copy link
Collaborator

@david-pl david-pl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty solid.

@Roger-luo @kaihsin just remember when reviewing that we are not merging into main, but another intermediate branch. So failing tests are fine.

if not self.allow_global:
# rewrite global to parallel
GlobalToParallel(dialects=entry.dialects)(entry)
# if not self.allow_global:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remember to uncomment these as soon as we have the new address analysis.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the new Address analysis is there in the base branch but it is still blocked because I need to update it for Kirin 0.20

zhenrongliew and others added 3 commits October 30, 2025 10:04
Removed commented `Method` constructor

Co-authored-by: David Plankensteiner <david-pl@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade codegen to new kirin version

5 participants